Wildform Wildform is the creator of the Flix SWF video encoder and the SWfX SWF text effects generator.
This tutorial was written by Kurt Dommermuth.
last modified December 7, 2000
<- back to tutorials
How To Make a Smart Clip
Table of Contents
Introduction
Requirements
Table of Contents
Sample Files
  • pauseMovie This .FLA is simply a Movie Clip that has begun to be changed into a Smart Clip.
  • pauseMovie.mxi An .MXI file is what is used by the Macromedia Extension Manager to package your Smart Clip.
  • pauseMovie.txt An example of a help file that you may want to include with your Smart Clip. (right click to save)
  • pauseMovieUI.fla This is a User Interface for the pauseMovie Smart Clip.
  • pauseMovieUI.swf This is simply an .swf published from pauseMovieUI.fla. (right click to save)
Table of Contents
Make your Movie Clip a Smart Clip.
To get started you need to have an .FLA open that includes one symbol; The Movie Clip that you wish to make into a Smart Clip.

It is important that you do not drag an instance of this Movie onto the stage. The stage should be empty. It is enough to have the Movie Clip in the library only.

To make your Movie clip a Smart Clip do the following:

1. Open your Library by either using the 'book' icon on the bottom right of your Flash 5 window or by going to Window > Library.

2. In the Library, locate the MC you wish to become a Smart Clip, right click on it and select 'Define Clip Parameters'. This will open a window like the following:

3. Parameters. Use the '+' sign and the '-' sign to add variables or to delete them. To change variable names and values double click on them and they will be editable. The up and down arrows allow you to adjust the order of the variables your including.

4. Link to custom UI. I am going to assume that you are going to include a "custom UI". If you don't know what that is yet, that's okay. We are going to discuss it more in a moment. If you do know what it is and you opt to not include a "custom UI", then skip this step. For the rest of us, here is what you need to do; In this window type "Smart Clip UI\" (no quotes) and the name of your smart clip plus "UI.swf" (no quotes). For example it would look like this: "Smart Clip UI\yourfilenameUI.swf". If that is unclear look at the jpeg above of the parameter window.

5. Description. Description is simply an area available to you to describe your variables. Good documentation is important. Be clear about what each Variable is for.

6. Put a "check" in the "Lock in instance" box. This makes it so Users won't be able to get into your Smart Clip later and inadvertantly mess with things.

6. Click OK.

7. Go to File > Save. Congrats! Your MC is well on it's way to becomming a Smart Clip. You can see in the Library that the normal MC icon has changed a bit.

Table of Contents
Make A Custom User Interface For Your Smart Clip
Macromedia says that a UI is not required for your Smart Clip, but it is recommended. A UI is a means for users of your smart clip to access and modify your Smart Clip's variables. Users can access these variables through a generic window (as seen above), but the Custom UI gives you an opportunity to make your Smart Clip more user friendly than the default. It's up to you.

If you'd like to make a Custom UI, here's how (note: the Flash 5 help files are pretty good in regards to this so I've taken all of the following directly from Macromedia and added just a little bit of clarification). To see their files directly (including pics!)... In Flash 5 go to Help > ActionScript Reference. Do a search for "Smart + Clips" (no quotes) and click on 'Creating a Custom Interface':

1. Choose File > New to create a new Flash movie.

2. Choose Insert > New Symbol to create the exchange movie clip. I think you could call it whatver you'd like, but to play it safe, call it "xch" (no quotes).

3. Go back to the main time line and create a new layer called "Exchange Clip".

4. With the "Exchange Clip" layer selected, open your symbol library and drag the exchange movie clip, "xch", from the Library window to the Stage, frame 1.

5. Select the exchange movie clip on the Stage, choose Window > Panels > Instance, and enter the name "xch" (no quotes).

6. Double click on the exchange Movie clip "xch" and create the interface elements that the User will interact with to set the clip parameters. For example, a pop-up menu, radio buttons, text input, or drag-and-drop menu items. Any variables that you want to give the User easy access, need to show up here. See my 'pauseMovieUI.fla' as an example. It is very simple, but should give you the idea.

7. Use the set variable action to copy variable and object values to the xch instance. For example, if a button is used as an interface element, the button could have an action that sets the value of the variable vertical and passes it to xch, as in the following:

on (release){
     _root.xch.vertical = true;
}

8. Save your UI .fla to the same folder that your Smart Clip is saved in. Name it the same as you did your Smart Clip but add a "UI" (no quotes) to the end. It should look like this "yourfilenameUI.fla".

9. Click on File > Publish to create an .swf. Great! Almost done.

Table of Contents
Do You Need to Include a Help File?
At this point you've had opportunity to include pointers in your Custom UI and in a moment you will see that there is also room in the MXI, but this may not be enough.

Some of you will be creating some complicated Smart Clips that may need additional explanation. If you need to include additional help, you can write a text file (.txt) or a .pdf and include it in the MXI (see 'Create The MXI!' below). Though my Smart Clip is simple I included a help file anyway. You'll see in my MXI, how I included it with the other files.

Table of Contents
Create The MXI!
First, what the heck is an MXI file? It is XML! Or even more simply, it is just a text file that will tell the Extension Manager how to package up your Smart Clip.

The best way to create an MXI file is to grab someone else's and use it as a template. Mine is included up above and it is easy enough to just go through it and change all the items that need to changed. I think it is commented well enough that you can follow. (BTW - you can open an MXI with Notepad)

Once you have gone through my MXI file and changed all the parameters to make it relative to your Smart Clip, save it to the same folder that contains your Smart Clip and Custom UI.

NOTE: An issue came up recently regarding submissions to the MM Exchange. There have been some failed submission attempts. According to the fantabulous Matt Wobensmith of Macromedia, there may be problems with MXI description areas that exceed 512 characters. Keep your MXI description areas simple and this hopefully won't be a problem.

Table of Contents
Package The MXI!
To package the MXI file you just created, you need the Macromedia Extension Manager.

1. To open the Extension Manager, in Flash 5, go to Help > Manage Exchange Items.
When opened it looks like this:

2. Go to File > Package Extension... and locate and select your MXI file. Press OK.

3. A new window will pop up suggesting you save the Extension Package (MXP) as the same name as your MXI file. Press OK.

4. If all went well you will get a message that the Extension Package was successfully created.

5. If instead, you got some sort of error message, chances are it has to do with the syntax being incorrect in the MXI file.

  • Make sure all the files you intend to package together are all in the same folder.
  • Make sure you accurately have the correct names listed in the MXI.
  • Check your MXI file against mine for any syntax differences.
Table of Contents
Install The MXP!
To install the MXP (which in our case is better known as a Smart Clip):

1. If the Extension manager is not still open, in Flash 5, go to Help > Manage Exchange Items.

2. Go to File > Install Extension... and locate and select your MXP file. Press OK. You will be asked to accept a license agreement. Click OK.

In addition to your Smart Clip being listed in the Extension Manager, it has also now become part of the Flash 5 Interface!

In the Extension Manager, highlight your Smart Clip. In the window below will be some of the key information you wrote in your MXI. Does it communicate what you want? Does it look the way you want? If not, uninstall your Smart Clip by going to File > Remove Extension. Edit your MXI, repackage and reinstall.

Table of Contents
TEST The Smart Clip!
It is important to test your Smart Clip. You want to make sure it showed up where it was supposed to and that the Custom UI you created is accessible. In addition, double check any documentation you created to make sure you've said what you've wanted to say and that you've been clear for your fellow flashers.

The best way to test is to try it out of course!

1. In Flash 5, go to File > New and create a new file.

2. Go to Windows > Common Libraries and select your Smart Clip! A library will open.

3. Drag your Smart Clip onto the stage.

4. Test it's functionality. Check to make sure you have access to your Custom UI. Highlight your Smart Clip, Go to Windows > Panels > Clip Parameters. This should bring up your Custom UI. Go to it. Test away and make sure that this baby works like it should.

If your Custom UI doesn't come up, it is probably because the path you indicated in the step 3 'Linking the Custom User Interface with the Smart Clip' (above) doesn't match up with the path you indicated in your MXI.

Table of Contents
Submit It To The Macromedia Exchange
So you are ready to SUBMIT? Okey Dokey. If you have been successful with everything so far, posting your Smart Clip for the world to see and use, won't be difficult.

There are step by step instructions at Macromedia on how to do this. You will need to register at MM if you haven't already done so.

NOTE: An issue came up recently regarding submissions to the MM Exchange. There have been some failed submission attempts. According to the fantabulous Matt Wobensmith of Macromedia, there may be problems with MXI description areas that exceed 512 characters. Keep your MXI description areas simple and this hopefully won't be a problem.

Go to the Macromedia Exchange now.

Table of Contents
<- back to tutorials
©2000 Wildform, Inc.